package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.hr.entity.SubsidyInfoDO;

import javax.validation.constraints.NotNull;
import java.util.List;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.AttendanceDedProgExample.E_APPLY_TO_PROG_ADD_DTO;
import static org.jsola.hr.example.AttendanceDedProgExample.N_APPLY_TO_PROG_ADD_DTO;
import static org.jsola.hr.example.SubsidyProgExample.*;
import static org.jsola.hr.example.SubsidyProgExample.E_ATTENDANCE_RANGE;
import static org.jsola.hr.example.SubsidyProgExample.E_ATTENDANCE_RANGE_DAYS;
import static org.jsola.hr.example.SubsidyProgExample.E_COMPANY_ID;
import static org.jsola.hr.example.SubsidyProgExample.E_NAME;
import static org.jsola.hr.example.SubsidyProgExample.E_REMARK;
import static org.jsola.hr.example.SubsidyProgExample.E_TAX_METHOD;
import static org.jsola.hr.example.SubsidyProgExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.SubsidyProgExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.SubsidyProgExample.M_NAME_MAX;
import static org.jsola.hr.example.SubsidyProgExample.M_REMARK_MAX;
import static org.jsola.hr.example.SubsidyProgExample.N_ATTENDANCE_RANGE;
import static org.jsola.hr.example.SubsidyProgExample.N_ATTENDANCE_RANGE_DAYS;
import static org.jsola.hr.example.SubsidyProgExample.N_COMPANY_ID;
import static org.jsola.hr.example.SubsidyProgExample.N_NAME;
import static org.jsola.hr.example.SubsidyProgExample.N_REMARK;
import static org.jsola.hr.example.SubsidyProgExample.N_TAX_METHOD;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【员工津贴方案】的参数")
@Data
public class SubsidyProgUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_NAME, example = E_NAME)
    @Length(max = 255, message = M_NAME_MAX)
    private String name;

    @ApiModelProperty(notes = N_REMARK, example = E_REMARK)
    @Length(max = 255, message = M_REMARK_MAX)
    private String remark;

    @ApiModelProperty(notes = N_TAX_METHOD, example = E_TAX_METHOD)
    private Integer taxMethod;

    @ApiModelProperty(notes = N_ATTENDANCE_RANGE, example = E_ATTENDANCE_RANGE)
    private Boolean attendanceRange;

    @ApiModelProperty(notes = N_ATTENDANCE_RANGE_DAYS, example = E_ATTENDANCE_RANGE_DAYS)
    private Integer attendanceRangeDays;

    @ApiModelProperty(notes = N_SUBSIDY_INFO_DO_LIST, example = E_SUBSIDY_INFO_DO_LIST)
    private List<SubsidyInfoDO> subsidyInfoDOList;

    @ApiModelProperty(notes = N_APPLY_TO_PROG_ADD_DTO, example = E_APPLY_TO_PROG_ADD_DTO)
    private ApplyToProgUpdateDTO applyToProgUpdateDTO;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;


}

